package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_user_friend;

//DAO
public interface U_user_friendMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_USER_FRIEND  WHERE ID = #{id}")
	public ApiU_user_friend findU_user_friendById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_user_friend")
	public List<ApiU_user_friend> findU_user_friends();

	// 添加
	@Insert("INSERT INTO U_USER_FRIEND (FRIEND_ID, U_RENAME, USER_ID, F_RENAME, ADD_TIME, IS_DEAL, STATUS, UPDATE_TIME, MSG, EXT1, EXT2, EXT3, EXT4, EXT5) VALUES (#{friend_id}, #{u_rename}, #{user_id}, #{f_rename}, #{add_time} , #{is_deal}, #{status}, #{update_time} , #{msg}, #{ext1}, #{ext2}, #{ext3}, #{ext4}, #{ext5})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_user_friend(ApiU_user_friend u_user_friend);

	// 修改
	@Update("UPDATE U_USER_FRIEND SET FRIEND_ID = #{friend_id}, U_RENAME = #{u_rename}, USER_ID = #{user_id}, F_RENAME = #{f_rename}, ADD_TIME = #{add_time}, IS_DEAL = #{is_deal}, STATUS = #{status}, UPDATE_TIME = #{update_time}, MSG = #{msg}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3}, EXT4 = #{ext4}, EXT5 = #{ext5} WHERE ID = #{id}")
	public int updateU_user_friend(ApiU_user_friend u_user_friend);

	// 删除
	@Delete("DELETE FROM U_USER_FRIEND  WHERE ID = #{id}")
	public int deleteU_user_friend(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
